// vite.config.js
import { defineConfig } from "file:///F:/NewLife/bookTicket/node_modules/vite/dist/node/index.js";
import obfuscatorPlugin from "file:///F:/NewLife/bookTicket/node_modules/vite-plugin-javascript-obfuscator/dist/index.cjs.js";
import vue from "file:///F:/NewLife/bookTicket/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import Components from "file:///F:/NewLife/bookTicket/node_modules/unplugin-vue-components/dist/vite.mjs";
import { VantResolver } from "file:///F:/NewLife/bookTicket/node_modules/unplugin-vue-components/dist/resolvers.mjs";
import viteCompression from "file:///F:/NewLife/bookTicket/node_modules/vite-plugin-compression/dist/index.mjs";
import path from "path";
var __vite_injected_original_dirname = "F:\\NewLife\\bookTicket";
var vite_config_default = defineConfig({
  plugins: [
    vue(),
    // mkcert(), 
    // visualizer({ open: true }),
    viteCompression({
      verbose: true,
      // 默认即可
      disable: false,
      //开启压缩(不禁用)，默认即可
      deleteOriginFile: false,
      //删除源文件
      threshold: 10240,
      //压缩前最小文件大小
      algorithm: "gzip",
      //压缩算法
      ext: ".gz"
      //文件类型
    }),
    Components({
      resolvers: [VantResolver()]
    }),
    obfuscatorPlugin({
      include: ["src/utils/config.js"],
      exclude: [/node_modules/],
      apply: "build",
      options: {
        // your javascript-obfuscator options
        // debugProtection: true,
        // ...  [See more options](https://github.com/javascript-obfuscator/javascript-obfuscator)
      }
    })
  ],
  define: {
    "process.env": {}
  },
  resolve: {
    alias: { "@": path.resolve(__vite_injected_original_dirname, "src") }
  },
  css: {
    preprocessorOptions: {
      // 全局样式引入
      scss: {
        additionalData: '@import "/src/assets/theme.scss";',
        javascriptEnabled: true
      }
    }
  },
  server: {
    host: "0.0.0.0"
    // https: true,
  },
  build: {
    minify: "terser",
    terserOptions: {
      // 清除console和debugger
      compress: {
        drop_console: true,
        drop_debugger: true
      }
    },
    rollupOptions: {
      output: {
        chunkFileNames: "js/[name]-[hash].js",
        entryFileNames: "js/[name]-[hash].js",
        assetFileNames: "[ext]/[name]-[hash].[ext]"
      }
      // manualChunks(id) {
      //   if (id.includes("node_modules")) {
      //     // 让每个插件都打包成独立的文件
      //     return id.toString().split("node_modules/")[1].split("/")[0].toString();
      //   }
      // }
    }
  }
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcuanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJGOlxcXFxOZXdMaWZlXFxcXGJvb2tUaWNrZXRcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIkY6XFxcXE5ld0xpZmVcXFxcYm9va1RpY2tldFxcXFx2aXRlLmNvbmZpZy5qc1wiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9pbXBvcnRfbWV0YV91cmwgPSBcImZpbGU6Ly8vRjovTmV3TGlmZS9ib29rVGlja2V0L3ZpdGUuY29uZmlnLmpzXCI7aW1wb3J0IHsgZGVmaW5lQ29uZmlnIH0gZnJvbSAndml0ZSdcclxuLy8gaW1wb3J0IHsgdml0ZU9iZnVzY2F0ZUZpbGUgfSBmcm9tICd2aXRlLXBsdWdpbi1vYmZ1c2NhdG9yJ1xyXG5pbXBvcnQgb2JmdXNjYXRvclBsdWdpbiBmcm9tIFwidml0ZS1wbHVnaW4tamF2YXNjcmlwdC1vYmZ1c2NhdG9yXCI7XHJcbi8vIGltcG9ydCBta2NlcnQgZnJvbSBcInZpdGUtcGx1Z2luLW1rY2VydFwiO1xyXG5pbXBvcnQgdnVlIGZyb20gJ0B2aXRlanMvcGx1Z2luLXZ1ZSdcclxuaW1wb3J0IENvbXBvbmVudHMgZnJvbSAndW5wbHVnaW4tdnVlLWNvbXBvbmVudHMvdml0ZSc7XHJcbmltcG9ydCB7IFZhbnRSZXNvbHZlciB9IGZyb20gJ3VucGx1Z2luLXZ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